<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="checkBox_demo.css">
    <title>CheckBox Demo</title>
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self';">
</head>

<body>
    <!-- 复选框 -->
    <hr>
    <input type="checkbox" id="checkBox1" />
    <span class="text" id="text1">勾选我</span>
    <input type="checkbox" id="checkBox2" />
    <span class="text" id="text2">勾选他</span>

    <!-- 自定义复选框 -->
    <hr>
    <input type="checkbox" id="checkBox3">
    <label for="checkBox3"><span id="text3">勾选我</span>
    </label>
    <input type="checkbox" id="checkBox4">
    <label for="checkBox4"><span id="text4">勾选我</span>
    </label>
</body>
<script src="checkBox_demo.js"></script>

</html>